#include <stdio.h>
#include <stdlib.h>


struct userData {
    char name[10];
    unsigned char age;
    float math;
    float eng;
};
typedef struct userData uData_t;

struct userData_packed {
    char name[10];
    unsigned char age;
    float math;
    float eng;
}__attribute__((packed));
typedef struct userData_packed pData_t;

struct userData_align {
    char name[10];
    unsigned char age;
    float math;
    float eng;
}__attribute__((aligned(16)));
typedef struct userData_align aData_t;


int main(){

    
    uData_t* ptrUData=NULL;
    pData_t* ptrData_packed=NULL;
    aData_t* ptrData_align=NULL;
    

    printf("sizeof uData_t = %ld\n", sizeof(uData_t));
    printf("sizeof pData_t = %ld\n", sizeof(pData_t));
    printf("sizeof aData_t = %ld\n", sizeof(aData_t));
    
    ptrUData = (uData_t *) malloc(sizeof(uData_t));
    ptrData_packed = (pData_t *) malloc(sizeof(pData_t));
    ptrData_align = (aData_t *) malloc(sizeof(aData_t));

    printf("address of ptrUData = %p\n", ptrUData);
    printf("address of ptrData_packed = %p\n", ptrData_packed);
    printf("address of ptrData_align = %p\n",  ptrData_align);

}